1. Field of the Invention
The present invention relates to a motor control apparatus which controls a motor for driving an opening/closing body of a vehicle.
2. Description of the Relates Art
An automobile is provided with an opening/closing body such as a window of a door, a sunroof, a slide door and the like, a motor for driving the opening/closing body, and a motor control apparatus for controlling the motor. Of motor control apparatuses, one which controls a motor for opening and closing a window is called a power window apparatus (or window open/close control apparatus). Generally, the power window apparatus normally or reversely rotate the motor by switching operation, thereby vertically moving a window glass of a door and opening or closing the window.
FIG. 1 shows a block diagram showing an electrical structure of the power window apparatus. A reference numeral 1 represents an operation switch for opening and closing a window, a reference numeral 2 represents a motor drive circuit for driving a motor 3, a reference numeral 4 represents a rotary encoder for outputting pulse which is synchronous with rotation of the motor 3, a reference numeral 5 represents a pulse detection circuit for detecting pulse output from the rotary encoder 4, a reference numeral 6 represents a memory comprising a ROM or a RAM, and a reference numeral 8 represents a control unit comprising a memory and a CPU which controls the opening and closing operation of the window.
If the operation switch 1 is operated, a window opening/closing command is given to the control unit 8, and the motor 3 is normally or reversely rotated by the motor drive circuit 2. If the motor 3 is rotated, a window open/close mechanism which is associated with the motor 3 is operated, and the window is opened or closed. The pulse detection circuit 5 detects pulse output from the rotary encoder 4, the control unit 8 calculates an opening/closing amount of the window and the motor speed based on a result of the detection, and controls the rotation of the motor 3 through the motor drive circuit 2.
FIG. 2 is a schematic diagram showing a structure of one example of the operation switch 1. The operation switch 1 includes an operation knob 11 which can be rotated in a direction ab around an axis Q, a rod 12 which is integrally provided on the operation knob 11, and a known slide switch 13. A reference numeral 14 represents an actuator of the slide switch 13, and a reference numeral 20 represents a cover of a switch unit into which the operation switch 1 is incorporated. A lower end of the rod 12 is engaged with the actuator 14 of the slide switch 13. If the operation knob 11 rotates in the direction ab, the actuator 14 moves in the direction cd through the rod 12, and a contact (not shown) of the slide switch 13 is switched in accordance with the position of the actuator 14.
The operation knob 11 can be switched to positions of automatic close AC, manual close MC, neutral N, manual open MO and automatic open AO. FIG. 2 shows that the operation knob 11 is in the neutral N position. From this position, if the operation knob 11 is rotated by a given amount in the direction a and brought into the manual close MC position, the manual closing action for manually closing the window is carried out, and if the operation knob 11 is further rotated in the direction a to the automatic close AC position, the automatic closing action for automatically closing the window is carried out. If the operation knob 11 is rotated from the neutral N position in the direction b by a given amount and is brought into the manual open MO position, manual opening action for manually opening the window is carried out, and if the operation knob 11 is further rotated from this position in the direction b and is brought into the automatic open AO position, automatic opening action for automatically opening the window is carried out. The operation knob 11 is provided with a spring (not shown), and if a user releases his or her hand from the operation knob 11 which was rotated, the operation knob 11 is returned to the neutral N position by the spring force.
In the case of the manual action, the opening or closing action of the window is carried out for time during which the operation knob 11 is manually held at the manual close MC position or the manual open MO position, and if the user release the hand from the operation knob 11 and the knob is returned to the neutral N position, the closing or opening action of the window is stopped. In the case of the automatic action, if the operation knob 11 is once rotated to the automatic close AC position or the automatic open AO position, even if the user release his or her hand from the operation knob 11 and the knob returns to the neutral N position thereafter, the closing action or opening action of the window is continuously carried out.
FIG. 3 shows one example of the window open/close mechanism provided in each window of a vehicle. A reference numeral 100 represents the window, a reference numeral 101 represents a window glass 101 which closes and opens the window 100, and a reference numeral 102 represents a window open/close mechanism 102. The window glass 101 carries out vertical action by operation of the window open/close mechanism 102, and if the window glass 101 moves upward, the window 100 is closed, and if the window glass 101 moves downward, the window 100 is opened. In the window open/close mechanism 102, a reference numeral 103 represents a support member mounted on a lower end of the window glass 101. A reference numeral 104 represents a first arm having one end engaged with the support member 103 and the other end rotatably supported by a bracket 106. A reference numeral 105 represents a second arm having one end engaged with the support member 103 and the other end engaged with the guide member 107. Intermediate portions of the first arm 104 and the second arm 105 are connected to each other through a shaft. A reference numeral 3 represents the motor and a reference numeral 4 represents the rotary encoder. The rotary encoder 4 is connected to a rotation shaft of the motor 3, and outputs a number of pulses which is proportional to the rotation amount of the motor 3. By counting the number of pulses output from the rotary encoder 4 within a predetermined time, the rotation speed of the motor 3 can be detected. The rotation amount of the motor 3 (moving amount of the window glass 101) can be calculated from the output of the rotary encoder 4.
A reference numeral 109 represents a pinion 109 which is rotated by the motor 3. A reference numeral 110 is a fan-like gear which meshes with the pinion 109 and rotates. The gear 110 is fixed to the first arm 104. The motor 3 can rotate both normally and reversely. By normal and reverse rotation, the pinion 109 and the gear 110 are rotated, and the first arm 104 is turned in the normal and reverse directions. With this, the other end of the second arm 105 slides laterally along a groove of the guide member 107, the support member 103 vertically moves to vertically move the window glass 101, thereby opening and closing the window 100.
In the power window apparatus, when the operation knob 11 is in the automatic close AC position in FIG. 2 and the automatic closing action is carried out, the power window apparatus has a function to detect that a substance is caught in the window. That is, as shown in FIG. 4, when a substance Z is caught in a gap of the window glass 101 during the closing process of the window 100, this situation is detected, and the closing action of the window 100 is stopped or is shifted to the opening action. Since the window 100 is automatically closed during the automatic closing action, if a hand or a neck is erroneously sandwiched, it is necessary to prohibit the closing action to prevent a person from being injured and thus, such a sandwich detecting function is provided. For detecting such sandwiched state, the control unit 8 always read the rotation speed of the motor 3 which is the output of the pulse detection circuit 5, compares the current rotation speed and the past rotation speed, detects whether there is rotation abnormality of the motor 3 based on a result of the comparison, and determines whether a substance is caught from the detection result. If a substance Z is caught in the window 100, load acting on the motor 3 is increased and the rotation speed is lowered abnormally. Therefore, the variation amount of the speed is increased and when the variation amount of the speed exceeds the threshold value, it is determined that the substance Z is caught. The threshold value is previously stored in the memory 6.
The variation in rotation speed of the motor 3 is generated not only when a substance is caught in the window but also due to vibration generated when a door is closed or when the vehicle runs on a bad road. If the rotation speed is varied due to such vibration, even when a substance is not caught in the window, it may erroneously be determined that the substance is caught and the window may be opened in some cases.
To prevent such a situation, in Japanese Patent Application Laid-Open No. 2000-160931 (paragraph 0055, FIG. 10 and the like), an average value of rotation speeds of the motor is calculated, a difference between the average value and the current rotation speed is calculated, and it is determined whether a substance is caught in the window from a result of comparison between the difference and a predetermined threshold value. In Japanese Patent No. 3657671 (paragraphs 0032 to 0035, FIG. 5 and the like), a difference between a first moving average value of pulse signal cycles including cycles of first pulse signal and a second moving average value of pulse signal cycles including past pulse signal cycles which are older than pulse signal cycles of at least the first moving average value of pulse signals which are synchronous with rotation of the motor is calculated as a motor load, and a rotation abnormality (excessive load) of the motor is determined from a result of comparison of the motor load and a predetermined threshold value. In Japanese Patent Application Laid-Open No. H7-212963 (paragraphs 0023, 0024 and FIG. 3 and the like), an average value from speed data showing latest rotation speed of the motor to speed data which is older by the A-number is determined as a current speed, speed data which is older than the latest speed data by the N-number is determined as a starting point, and an average value of speed data from the speed data which is older by the N-number to speed data which is older by B-number is defined as an older speed. When the current speed is smaller than the older speed and a difference therebetween is greater than a predetermined threshold value, it is determined that rotation abnormality is generated in the motor.
According to the above-described power window apparatuses, acceleration and deceleration of rotation speed of the motor 3 may be repeated due to mechanical factor such as deviation of a center shaft of the pinion 109, and the rotation speed may be vertically largely pulsated (swung). In this case, since pulses are included in the output signal (pulse signal) from the rotary encoder 4, even though rotation abnormality of the motor 3 caused by a substance Z caught in the window is not generated, it may be erroneously determined that the rotation abnormality is generated in some cases.
Hence, it is an object of the present invention to provide a motor control apparatus capable of detecting rotation abnormality of a motor without receiving influence of pulse of a rotation speed of a motor.